<template>
	<!--搜索页找公司结构组件  -->
	<view class="enterprise ">
		<view @click="toDetailEnterprise(item)" class="subheadBox" style="border-bottom: 1rpx solid #ccc;"
			v-for="(item,index) in companyList" :key="index">
			
			<view class="together name ">
				<view class="setVerticalCenter" >
			
					<text style="font-size: 65rpx; color: #19be6b;" class="iconfont iconwodeqiye"></text>
					
					<text class="setFont" >
						{{item.companyName}}
					</text>
									
				</view>
				
			</view>
			
			<view class="together data setwarp setVerticalCenter ">
			
				
				<view class="setVerticalCenter  setwarp">
					<view class="setRightMargin"  v-if="item.companyBidArea">
						<u-tag  size="mini" :text="item.companyBidArea" color="#fff" type="success">
						</u-tag>
			
					</view>
					<view class="setRightMargin" v-if="item.companyBidCity">
						<u-tag size="mini" color="#fff" :text="item.companyBidCity"
							type="success"></u-tag>
					</view>
					
				</view>
				<view class=" positionStyle setBoxBorder" v-if="item.companyBidPubTime">
					<text class="setfontSize2 setcolor2">{{item.companyBidPubTime.substr(0,10)}}</text>
				</view>
			</view>
			
			<view v-if="item.bidTitle" class="together  setVerticalCenter">
				
				<view class="setNowrap2 setMarginVertical bidNotice"  >
						{{item.bidTitle}}
				</view>
			
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			companyList:{
				type:Array,
				Array:[]
			},
			showLastName:{
				type:String,
				String:''
			}
		},
		data() {
			return {
				content: '曾用名：湖南中天建设集团有限公司 | 湖南中天建设有限公司',
				
			}
		},
		
		
	
		beforeMount() {
			// console.log("---------------------------")
			// console.log("++++++++++++++",this.companyList)
		},
		methods: {
			// 清除数组
			
			// clearCompayList(){
			// 	this.companyList=[]
			// },
			// 拨打电话
			callPhone(phone){
				 
				         uni.makePhoneCall({
								phoneNumber:phone,
								success:function(){
									console.log('拨打电话成功');
								},
								fail() {
									console.log('打电话失败了');
								}
							})
				
			
				//#ifdef APP-PLUS
				
				// #endif
				
			},
			
			// 跳转至公司详情页面
			toDetailEnterprise(item) {
				// 将企业ID传值至详情页面
				uni.navigateTo({
					url:`/pagesFind/detailenterprise/detailenterprise?companyCid=${item.companyCid}`
				})
			}
		}
	}
</script>

<style lang="scss">
	.enterprise {
		font-size: 25rpx;
		color: #82848a;
		margin-bottom: 20rpx;

		.subheadBox {
			background-color: #fff;
			//padding: 0 0 15px 0;
			// border-radius: 15rpx;
			margin-bottom: 15rpx;
		
			.together {
				display: flex;
				margin: 0rpx 25rpx;
				justify-content: space-between;
				.bidNotice{
					font-size: 30rpx;
					color: #303133;
					font-weight: 520;
					
				}
			}
		
			.name {
				font-size: 30rpx;
				font-weight: 500;
				color: #505050;
			}
		
			.data {
				// text {
				// 	color: #19be6b;
				// }
		
				.positionStyle {
		
					margin-top: 10rpx;
				}
			}
		}


	}
</style>
